package com.fruit.service.user;


import java.util.List;
import java.util.Map;

import com.fruit.pojo.goods.Goods;
import com.fruit.pojo.order.OrderGood;
import com.fruit.pojo.user.Follow;
import com.fruit.pojo.user.Region;
import com.fruit.pojo.user.Address;
import com.fruit.pojo.user.ComAccount;
import com.fruit.pojo.user.SupplierReal;
import com.fruit.pojo.user.UserInfo;
import com.fruit.pojo.user.UserLogin;

public interface UserManager {
	

	/**
	 * 通过用户名查找用户
	 * @param userName
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public UserLogin getUserLoginByUserName(String userName);
	
	/**
	 * 获取登录信息
	 * @param loginId
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public UserLogin getUserLoginById(int loginId);
	
	/**
	 * 通过loginId获取用户信息
	 * @param loginId
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public UserInfo getUserInfoByLoginId(int loginId);
	
	/**
	 * 验证注册验证码邀请码
	 * @param ul
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public Map<String, Object> getRegisterValidate(UserLogin ul);
	
	/**
	 * 修改用户密码
	 * @param ul
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public Map<String, Object> updatePwd(UserLogin ul);
	
	/**
	 * 用户注册
	 * @param login
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public Map<String, Object> saveUserRegister(UserLogin login, SupplierReal sr);

	/**
	 * 用户收货地址
	 * @param int
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public List<Address> getAddressList(Map<String, Object> parame);

	/**
	 * 添加收货地址
	 * @param Address
	 * @version 2017
	 */
	public void saveAddress(Address address);

	/**
	 * 修改收货地址
	 * @param Address
	 * @version 2017
	 */
	public void updateAddress(Address address);

	/**
	 * 删除收货地址
	 * @param int
	 * @version 2017
	 */
	public void deleteAddress(int id);

	/**
	 * 用户收货地址
	 * @param int
	 * @return
	 * @author admin
	 * @version 2017
	 */
	public Address getAddress(int id);

	/**
	 * 地区下拉信息
	 * @param int
	 * @author admin
	 * @version 2017
	 */
	public List<Region> regionList(int id);

	/**
	 * 用户信息
	 * @param int
	 * @author admin
	 * @version 2017
	 */
	public UserInfo getUser(int userId);

	/**
	 * 修改用户信息
	 * @param UserInfo
	 * @author admin
	 * @version 2017
	 */
	public void updateUserMess(UserInfo user);

	/**
	 * 修改用户信息
	 * @param UserInfo
	 * @author admin
	 * @version 2017
	 */
	public void updateUserHeadImage(UserInfo user);

	/**
	 * 添加关注
	 * @param Follow
	 * @author admin
	 * @version 2017
	 */
	public void saveFollow(Follow follow);

	/**
	 * 关注商品列表
	 * @param parame
	 * @author admin
	 * @version 2017
	 */
	public List<OrderGood> getFollowList(Map<String, Object> parame);

	/**
	 * 删除关注
	 * @param Follow
	 * @author admin
	 * @version 2017
	 */
	public void deleteFollow(Follow follow);

	/**
	 * 修改地址状态
	 * @param Address
	 * @author admin
	 * @version 2017
	 */
	public void updateAddStatus(Address addre);

	/**
	 * 获取商品是否关注
	 * @param Follow
	 * @author admin
	 * @version 2017
	 */
	public int getFollowNum(Follow follow);

	/**
	 * 获取联系方式
	 * @param 
	 * @author admin
	 * @version 2017
	 */
	public ComAccount getContact();

}
